/**
 * Created by Wang on 2015/12/6 0006.
 */
'use strict';

angular
  .module('myApp')
  .config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
    $routeProvider
      .when('/', {
        templateUrl: 'views/home.html',
        controller: 'homeCtrl',
        controllerAs: 'home'
      })
      .when('/home',{
        redirectTo: '/'
      })
      .when('/articles', {
        templateUrl: 'views/articles.html',
        controller: 'articleCtrl',
        controllerAs: 'article'
      })
      .otherwise({
        redirectTo: '/'
      });
    $locationProvider.html5Mode(true);
  }]);
